//封装用户信息到本地存储

const USERDATA = 'user_info'

function setUserInfo(userInfo) {
    return localStorage.setItem(USERDATA, JSON.stringify(userInfo))
}

function getUserInfo() {
    return localStorage.getItem(USERDATA)
}

function removeUserInfo() {
    return localStorage.removeItem(USERDATA)
}

export {
    setUserInfo,
    getUserInfo,
    removeUserInfo
}